package easy;

public class Solution_1464 {

    public int maxProduct(int[] nums) {
        int a = Integer.MIN_VALUE, b = Integer.MIN_VALUE;
        for (int num : nums) {
            if (num > a) {
                b = a;
                a = num;
            } else if (num > b) {
                b = num;
            }
        }
        return (a - 1) * (b - 1);
    }

    public static void main(String[] args) {
        Solution_1464 model = new Solution_1464();
    }
}
